﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <fieldset>
        <legend><%= Html.ThemeImage("cog.png") %> Install Plugin</legend>

        <h2>
            <%= ViewData["PluginName"] %> was installed
        </h2>

        <h3>
            Final Step:
        </h3>

        <p>
            Before the plugin can function properly, the <em>Web.config</em> file must be edited to include the assembly
            <em><%: ViewData["AssemblyName"] %></em> under the "assemblies" section:

            <pre>
                <%: "<system.web>" %>
                    <%: "<compilation targetFramework=\"4.0\">" %>
                        <%: "<assemblies>" %>
                            <%: "<add assembly=\"" + ViewData["AssemblyName"] + "\"/>"%>
            </pre>

        </p>

        <p>
            You may do this manually or press the button below to automatically do this.
            <br />

            <strong>Note: Editing the <em>Web.config</em> file will restart the <em>AppDomain</em></strong>
        </p>

        <% using(Html.BeginForm("EditWebConfig", "Plugins")) { %>
            <input type="hidden" value="<%= ViewData["AssemblyName"] %>" name="AssemblyName" />
            <input type="hidden" value="<%= ViewData["PluginName"] %>" name="PluginName" />
            <input type="submit" value="Automatically edit Web.config file" /> | <%= Html.ActionLink("Back to plugins", "Index", "Plugins") %>
        <% } %>

    </fieldset>

</asp:Content>
